﻿#ifndef RECORDTHREAD_H
#define RECORDTHREAD_H

#include <QThread>
#include <QMutex>
#include <QWaitCondition>

class QFile;
class QTextStream;
class QTimer;

namespace ScriptManager
{
    class RecordThread : public QThread
    {
        Q_OBJECT
    public:
        RecordThread(QObject *parent = nullptr);
        ~RecordThread();

        void pause();
        void stop();
        void reStart();

    private:
        void run() override;

    private slots:
        void writeRecordScriptFile();
        void slot_updateProjectTempDir();

    private:
        QFile* _file{};
        QTextStream *_IO{};

        int _states{ 0 };//-1暂停 0 正常运行 1 停止
    
    };
}

#endif // _RECORDSCRIPT_H_
